package com.harlov.robanuka.support;

import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.extension.physics.box2d.PhysicsWorld;

import com.harlov.robanuka.support.gameobject;
import com.harlov.robanuka.support.gameobject.Type;
import com.harlov.robanuka.weapons.laser;
import com.harlov.robanuka.objects.*;

public class gameobjects {
	
	public static final int SIZE = 100;
	public int count = 0;
	private gameobject[] mMap = new gameobject[SIZE];
	
	private resources mRes;
	private PhysicsWorld mWorld;
	private Scene mScene;
	
	  public gameobjects(final resources res, PhysicsWorld world,Scene scene) {
	    mRes = res;
	    mWorld = world;
	    mScene = scene;
	  }
	  
	  public void add(Type type, final int posH, final int posW) {
		    gameobject object = null;
		    switch (type) {
		    case player:
		      object = new player(posH, posW, mRes.getPlayer(), mWorld , mScene);
		      break;
		    case laser_shot:
		    	object = new laser_shot(posH,posW,mRes.getLaserShot(),mWorld, mScene);
		    default:
		      break;
		    }
		    count++;
		    mMap[count] = object;
		  }

}
